<!doctype html>
<html lang="en">
 <head>
  <meta charset="UTF-8">
  <meta name="Generator" content="EditPlus®">
  <meta name="Author" content="">
  <meta name="Keywords" content="">
  <meta name="Description" content="">
  <title>Document</title>
 </head>
 <body>
  
 </body>
</html>
<script>
	var phone = prompt('请输入一个手机号');
	//13476985643
	//phone是字符串类型
	//手机号，正则规则:
	//第一个必须1  ^1
	//第二位也有要求 [34578]
	//剩下的[0-9]{9}
	var re = /^1[34578][0-9]{9}$/g;
	if(re.test(phone)){
		alert('手机号正确');
	}else{
		alert('手机号不对');
	}
</script>
